package com.holly.unit.query.starter;

import com.holly.unit.query.QueryGenerator;
import com.holly.unit.query.api.QueryApi;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 类描述: 查询构建器模块的自动配置
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/4/6 18:13
 */
@Configuration
public class QueryAutoConfiguration {

    /**
     * 查询构建器API
     *
     * @author holly
     * @date 2020/12/1 14:40
     */
    @Bean
    @ConditionalOnMissingBean(QueryApi.class)
    public QueryApi queryApi() {
        return new QueryGenerator();
    }

}
